package com.tomtop.core.model;

import java.io.Serializable;

import com.tomtop.core.utils.JSONUtils;
import com.tomtop.core.utils.StringUtils;

public abstract class SysModel implements Serializable {
	public static final long serialVersionUID = 1L;

	public final String toJSONString() {
		return JSONUtils.toJSONString(this);
	}

	public final String toJSONHTML() {
		String jsonstr = toJSONString();
		if(StringUtils.isEmpty(jsonstr))
			return null;
		return jsonstr.replace("'", "&apos;").replace("\"", "&quot;");
	}
}
